package com.net.shop.car.manager.api.volley.request;

import org.json.JSONException;
import org.json.JSONObject;

import com.net.shop.car.manager.api.volley.Request;
import com.net.shop.car.manager.utils.Constants;
import com.net.shop.car.manager.utils.LogUtils;

/**
 * 修改密码
 * @author Deve 
 *
 */
public class ModifyPassword extends Request {

	/**
	 * 手机号
	 */
	private final String mobile;

	/**
	 * 旧密码
	 */
	private final String oldpwd;

	/**
	 * 新密码
	 */
	private final String newpwd;

	public ModifyPassword(String mobile, String oldpwd, String newpwd) {
		super(Constants.MODIFY_PWD);
		this.mobile = mobile;
		this.oldpwd = oldpwd;
		this.newpwd = newpwd;
	}

	@Override
	public void extensionJSON(JSONObject jsonObject) {
		try {
			jsonObject.put("mobile", mobile);
			jsonObject.put("oldpwd", oldpwd);
			jsonObject.put("newpwd", newpwd);
		} catch (JSONException e) {
			LogUtils.e(e.getMessage());
		}
	}

}
